﻿<button class="btn btn-primary" @onclick="@IncrementCount">Click me</button>

@code {
    [Parameter]
    public EventCallback<int> OnUpdate {get; set;}

    int _currentCount;

    async Task IncrementCount()
    {
        _currentCount++;
        await OnUpdate.InvokeAsync(_currentCount);
    }
}
